<?php
class DownloadAction extends Action{
	//下载文件
	//用Get方法传入下载路径
	public function index(){
		if(!empty($_GET['src']) and file_exists(APP_PATH.$GET['src'])){
			import("ORG.Net.Http");
			Http::download(APP_PATH.$_GET['src'],$_GET['name']);
		}else{
			$this->error('文件不存在');
		}
	}
}
?>
